%\documentclass[twoside,titlepage]{report}

%\usepackage{fullpage}
%\usepackage{graphicx}
%\usepackage{verbatim}
%\usepackage{wrapfig}
%\usepackage{amsmath}
%\usepackage{moreverb}
%\newcommand{\loadsrc}[1]{
%\subsection{#1}
%{\scriptsize{
%\verbatimtabinput[8]{#1}}}
%}

%\begin{document}
\section{Project Planning}
In general, our project planning process involved regular group meetings and email communication.

Our first goal, after group formation, was to create a viable project proposal. After 3-4 group meetings and much individual research, we decided upon MatPix. We wanted to make sure that our proposed project was simple enough to be viable given the time frame, as well as complex enough to provide unique functionality. With this goal in mind, we decided upon a Matlab-like language with added GPU computation. Initially, our goal was to divorce the matlab component from the GPU component, so that if the GPU computation proved too complex, then we would still be able to achieve a matlab-like language. However, while much work needs to be done to utilize the efficiency of GPU computation, we were able to achieve both matlab and GPU components of our project.

Our next step was to decide upon the syntax and semantics of our new language. This also involved group meetings as well as some investigation into Matlab syntax/semantics. After establishing a relatively complete conceptual picture of MatPix, we began work on the LRM and Lexer/Parser.

We leveraged googlecode and subversion version control to work on our project. Version control along with group programming allowed us to complete the LRM and Lexer/Parser in a group coding format.

The next phase involved working on the GPU backend as well as the tree walker. The GPU backend was written by Ollie, while the entire group worked on the tree walker. The symbol table and scoping issues were mostly handled by Rob.

Throughout the entire process, we developed unit tests that together functioned as a regression test for future modifications. We used these tests to make sure that new functionality did not break old functionality. These tests will be described in more detail in the Testing Plan section.

Finally, we finished writing our comprehensive tests and debugging. In the testing phase, Rob was responsible for maintaining the unit/regression tests, Ollie/Ben debugged the GPU backend, and David developed the regression algorithm and organized the final project report.

\section{Individual Responsibilities}
As a summary, general group responsibilities can be roughly defined below.

\begin{flushleft}
\begin{small}
\begin{tabular}{|l|l|}
\hline
David Burkat& algorithm testing, documentation \\
\hline
Oliver Cossairt & GPU backend, backend testing \\
\hline
Robert Hawkins & parse table, unit/regression testing \\
\hline
Ben London & backend testing, unit/regression testing \\
\hline
\end{tabular}
\end{small}
\end{flushleft}
However, the lexer/parser/tree walker was implemented largely as a group effort.


\section{Programming Style}
\subsection{ANTLR}
It is easy for ANTLR grammar syntax to become too complicated. This makes debugging the grammar very complicated. For this reason, we prefer many simple rules as opposed to few complex rules. It is crucial to intuitively name each tree node so that there is no confusion.

Parser rules should not be excessively long. In this case, It is best to break the rules into a set of simpler rules.

\subsection{Java}
Most of our Java code was in the tree-walker. This code prints out the proper C++ code.
As is standard practice, all Java variables should have intuitive names. 
Each indentation should be $4$ spaces or a tab character.
For code clarity, each curly brace should occupy its own line.

In general, it is preferable to have more spacing between lines. Thus, each "else" should occupy its own line.

We try to catch all possible errors using try catch blocks in the Java Code (except run-time errors). Run time errors are caught in the C++ code.
\subsection{C++}

The C++ coding standards are very similar to the Java Standards with a few differences.

First, due to the interaction with the GPU libraries and matrix manipulation, it is difficult to have simple code. Often times, functions are complicated and have many arguments. Thus, it is important to have as much clarity as possible in the variable names. Intuitive variable naming facilitates debugging. Since many of the matrix/vector transformations involve keeping track of rows, columns, and indices, it is crucial that the C++ code is easy to understand.
\subsection{MatPix}
The MatPix coding conventions are very similar to Matlab conventions. We note that MatPix employs curly braces to mark code blocks. We felt that this code feature would make it easier for C++/Java users to adapt to MatPix.

As usual, we encourage the use of descriptive commenting in MatPix. Often times, Matrix Mathematics can result in very dense and complicated code. It is important to use comments to describe otherwise opaque manipulations.

While we would like to encourage descriptive variable naming in MatPix, our language has a similar problem to other mathematical languages. In a complicated algorithm, it is often difficult to assign intuitive names to variables which store intermediate computations. When such a problem occurs, it is often best to adopt canonical mathematical symbol names (A, B, X, Y, alpha, gamma, etc) when such exist.

\section{Tools and Languages}
The Lexer, Parser, and Tree walker were written in ANTLR. The ANTLR compiler generated java code. ANTLR was particularly well suited for a concise compiler.  Our compiler backend, however, was written and compiled with GNU C++. That is, our generated Java Code had as its ouptut C++ code. C++ was used specifically for access to the GPU library calls. Python and Makefile were used for scripting the unit/regression tests. Python allowed us to easily conduct comprehensive unit and regression tests. This testing suite allowed us to make incremental progress while being assured that no new features broke old functionality.

We used GoogleCode for our project repository. This involved SVN for version control. All project related files were stored in GoogleCode under the MIT open source license. Googlecode provided the server space for our project, while SVN facilitated coordinated development.


\section{Timeline}
Below is the project timeline. These dates are anticipated completion deadlines for each section of our project. They were only preliminary and subject to change given unanticipated scheduling conflicts.

\begin{flushleft}
\begin{small}
\begin{tabular}{|l|l|}
\hline
September 25 & Project Proposal \\
\hline
October 5 & LRM Outline \\
\hline
October 18 & LRM, Parser, and Lexer \\
\hline
October 30 & Preliminary Tree Walker\\
\hline
November 16 & GPU Backend, \\
\hline
November 23 & Grammar File, Scoping Complete \\
\hline
November 24-December 18 & Testing \& Debugging \\
\hline
December 14-18 & Project Report \\
\hline
December 18 & Project Due\\
\hline
\end{tabular}
\end{small}
\end{flushleft}

We note here that the bulk of the project work was in the debugging and testing phase. For this reason, we dedicated a significant amount of time to fixing errors and developing tests to verify the integrity of the language. 

Debugging involved fixing errors and then verifying the regression tests. The culmination of the testing phase was the completion of the matrix inverse algorithm and the accompanying regression algorithm. We discuss the layout of our regression and unit tests in the Testing Plan section.


\section{Project Log}

Below is the project log. The project log documents the dates of important events in the timeline of the MatPix project.

\begin{tabular}{|l|l|}
\hline
9-04-2007 & PLT Group Formed \\
9-06-2007 & MatPix Proposed \\
9-10-2007 & VC \& IDE Established \\
9-18-2007 & GPU Proof of Concept \\
9-24-2007 & Project Proposal Written \\
10-5-2007 & LRM First Draft\\
10-17-2007 & Parser, Lexer First Draft\\
10-30-2007 & Tree Walker Draft \\
11-16-2007 & GPU Backend Completed \\
11-22-2007 & Tree Walker Complete \\
11-23-2007 & Symbol Table Complete \\
11-24-2007 & Testing \& Debugging Commences \\
12-10-2007 & Code Finalized (Walker, Backend, etc) \\
12-13-2007 & Report Started\\
12-14-2007 & Inversion \& Regression Work! \\
12-17-2007 & Report Finalized, LRM updated\\

\hline
\end{tabular}




%\end{document}